# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1PrintJob do
  @moduledoc """
  Represents a request to print a document that has been submitted to a printer.

  ## Attributes

  *   `colorMode` (*type:* `String.t`, *default:* `nil`) - Color mode.
  *   `completeTime` (*type:* `DateTime.t`, *default:* `nil`) - Print job completion timestamp.
  *   `copyCount` (*type:* `integer()`, *default:* `nil`) - Number of copies.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Print job creation timestamp.
  *   `documentPageCount` (*type:* `integer()`, *default:* `nil`) - Number of pages in the document.
  *   `duplexMode` (*type:* `String.t`, *default:* `nil`) - Duplex mode.
  *   `id` (*type:* `String.t`, *default:* `nil`) - Unique ID of the print job.
  *   `printer` (*type:* `String.t`, *default:* `nil`) - Name of the printer used for printing.
  *   `printerId` (*type:* `String.t`, *default:* `nil`) - API ID of the printer used for printing.
  *   `state` (*type:* `String.t`, *default:* `nil`) - The final state of the job.
  *   `title` (*type:* `String.t`, *default:* `nil`) - The title of the document.
  *   `userEmail` (*type:* `String.t`, *default:* `nil`) - The primary e-mail address of the user who submitted the print job.
  *   `userId` (*type:* `String.t`, *default:* `nil`) - The unique Directory API ID of the user who submitted the print job.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :colorMode => String.t() | nil,
          :completeTime => DateTime.t() | nil,
          :copyCount => integer() | nil,
          :createTime => DateTime.t() | nil,
          :documentPageCount => integer() | nil,
          :duplexMode => String.t() | nil,
          :id => String.t() | nil,
          :printer => String.t() | nil,
          :printerId => String.t() | nil,
          :state => String.t() | nil,
          :title => String.t() | nil,
          :userEmail => String.t() | nil,
          :userId => String.t() | nil
        }

  field(:colorMode)
  field(:completeTime, as: DateTime)
  field(:copyCount)
  field(:createTime, as: DateTime)
  field(:documentPageCount)
  field(:duplexMode)
  field(:id)
  field(:printer)
  field(:printerId)
  field(:state)
  field(:title)
  field(:userEmail)
  field(:userId)
end

defimpl Poison.Decoder, for: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1PrintJob do
  def decode(value, options) do
    GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1PrintJob.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1PrintJob do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
